package com.lej.my.space

import androidx.appcompat.widget.AppCompatImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.lej.core.utils.load
import com.lej.dataservice.club.bean.main.my.MySpaceInfo
import com.lej.my.R

/**
 *  author: cjq
 *  date  : 2022/6/21 0021
 *  desc  :
 */
class MySpaceAdapter(resId:Int) : BaseQuickAdapter<MySpaceInfo, BaseViewHolder>(resId) {
    override fun convert(holder: BaseViewHolder, item: MySpaceInfo) {
        val iv = holder.getView<AppCompatImageView>(R.id.iv_space)
        load(item.image,R.drawable.ic_space_load,R.drawable.ic_space_load_error,iv)
        holder.setText(R.id.tv_title,item.title)
    }
}